using System;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Collections;
using System.Collections.Generic;

namespace Nate.GUI.Canvas
{
    public partial class NavMesh
    {
        public class Vertex
        {
            public class ID : NUtils.SimpleID { public ID(int value) : base(value) { } }

            public Vertex.ID Id
            {
                get
                {
                    return _id;
                }
            }
            public PointF Point
            {
                set
                {
                    _point = value;
                    _rect = new RectangleF(_point.X - vert_size_half.Width, _point.Y - vert_size_half.Height, vert_size.Width, vert_size.Height);
                }
                get
                {
                    return _point;
                }
            }
            public RectangleF Rect
            {
                get
                {
                    return _rect;
                }
            }
            public bool Highlighted
            {
                get
                {
                    return _highlighted;
                }
                set
                {
                    _highlighted = value;
                }
            }
            public bool Bordered
            {
                get
                {
                    return _bordered;
                }
                set
                {
                    _bordered = value;
                }
            }

            public Vertex(Vertex.ID id, PointF p)
            {
                _id = id;
                Highlighted = false;
                Bordered = false;
                Point = p;
            }

            private Vertex.ID _id;
            private PointF _point;
            private RectangleF _rect;
            private bool _highlighted;
            private bool _bordered;

            private static SizeF vert_size = new SizeF(10, 10);
            private static SizeF vert_size_half = new SizeF(vert_size.Width / 2.0f, vert_size.Height / 2.0f);
        }
    }
}